Some computing systems including dynamic random-access memory (DRAM) for main memory currently use a directory-based cache coherence protocol—where the cache coherence state is stored in a distributed directory in main memory. In some implementations, error correcting code (ECC) bits on each cache line in memory are used to store the directory state of that cache line. This is done to improve memory latency in a multi-socket computing system—since a processor can consult the directory and avoid the need to snoop in some cases (which takes time and adds to the overall memory access latency). For example, the directory can indicate that no processor coupled to a remote socket has a copy of a given cache line in its cache. This eliminates the need to snoop for presence of that cache line in the caches coupled to the remote sockets. When a processor in a socket does access a cache line in memory, resulting in a copy of the cache line being cached, the directory needs to be appropriately updated in main memory. This is done by writing appropriate values to the ECC bits of that cache line in memory.
Directory protocols have been successful in reducing latency for DRAM. However, emerging memory technologies, such as persistent memories (e.g., non-volatile memories (NVMs)), have markedly different characteristics from DRAM: they have much higher latencies (approximately several times that of DRAM latency), and reads and writes have different bandwidths (read bandwidth is greater than write bandwidth). Both of the above negatively impacts the usage of directory-based coherence in different ways. The lower latency due to use of the directory can help with the latency challenges for persistent memory. Unfortunately, when there are several updates to be made to the directory, this can exacerbate the write bandwidth limitations, in particular, when the available bandwidth in the channel is limited. Thus, the write traffic to persistent memory due to directory traffic alone limits the read bandwidth available to an application.
An approach to this problem is to turn off the use of the directory. However, this results in a loss of the latency advantage due to avoiding snoops when using a directory, especially during phases when the bandwidth in the computing system is low. Further, one has to statically make a choice regarding directory usage at boot time. This involves making a hard boot-time tradeoff between latency and bandwidth and does not allow for a solution that considers both at the same time.